-
-
Notifications
You must be signed in to change notification settings - Fork 33
feat: add search knowledge base title #2392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
User Test ResultsTest specification and instructions User tests are not required |
|
Looking at the screenshots, I think it would be helpful to see the filter. For example add a paragraph between the search field and the results that displays after a search. The text could be something like Showing results for "howto": |
|
@ermshiperete, I decided to add the query onto the input instead. Would this be fine? |
|
|
||
| $searchTarget = strtolower("KMKB{$id} {$title}"); | ||
| if ($query !== '' && stripos($searchTarget, $query) === false) { | ||
| continue; // skip this if there isn't a query and a query match |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have to fclose($handle); before we continue so that we don't leak $handle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure. What will be the issue if it is leaked?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the worst case the server uses more and more resources and eventually can crash because it runs out of file handles. Whether or not that happens depends on the implementation of the server, how often processes get restarted etc, but leaks always smell.
I'm not that familiar with php and don't know if fclose is mainly cosmetic and php does some kind of garbage collection in the background, but if there is a fclose and we call it elsewhere, I'd call it here as well.
This reverts commit f1ae2562240d61295d28920217c89c957bd0b402.

I made this to be able to search for the kb article's title.
This PR is ready for reviews.
Test-bot: skip
Before search

When search
